#!/bin/bash

rm -f ./emu

export X264_ROOT=/usr/local

export CGO_LDFLAGS="-static -L$X264_ROOT/lib/ -lx264 -L/usr/lib64/ -lm  -Wl,-Bdynamic -ldl -Wl,--as-needed"

export LD_LIBRARY_PATH=$X264_ROOT/lib
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
export GO111MODULE=on
export GOPROXY=https://goproxy.cn,direct

go build .